package com.dantwining.jade.oo;

import jade.core.AID;
import jade.oo.core.behaviours.Outbox;
import jade.oo.core.behaviours.TickerAction;

public class TimeRequestorAction implements TickerAction {

	private final Outbox outbox;

	public TimeRequestorAction(Outbox outbox) {
		this.outbox = outbox;
	}

	@Override
	public void onTick() {
		String message = "what's the time, Mr Wolf?";
		System.out.println(message);
		outbox
				.send(message, new AID("TimeResp",
						AID.ISLOCALNAME));
	}

}
